home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / mus / midi / MusicXRexxMacs.lha / macros / COPY.mxe next >
Text File  |  1997-02-10  |  2KB  |  126 lines

  1. /*   copy   */
  2. /* © Dick Doyle */
  3.  
  4.  
  5.  
  6.  
  7. options results
  8.  
  9. MXSLIDER "Nº of Copies,1,99,1"
  10.  
  11. MXREQUEST "COPY,YES"
  12. if result == 0 then exit
  13. MXPOINTER "sleepy"  
  14.  
  15. MXVALUE 1
  16. times = result
  17.  
  18.  
  19.  
  20.  
  21.         
  22. GETBARDATA
  23.  
  24.  
  25.  
  26. if BARDATA.SELECT == 'NONE' then do
  27.     MXREPORT "You must select some notes!"
  28.     exit
  29.     end
  30. if BARDATA.SELECT == 'MARK' then
  31. SIGNAL MK
  32.  if BARDATA.SELECT == 'SELECT' then
  33. SIGNAL ST
  34.  
  35.  
  36.  
  37. MK:
  38. BEGINSCAN 'selected'
  39.  
  40. if result ~= 0 then do forever        
  41.   
  42. nob = BARDATA.STOP.BARS - BARDATA.START.BARS
  43.  
  44. NEXTEVENT                
  45.   if result == 0 then break
  46.  
  47.  
  48.  if EVENT.TYPE == 'NOTE' then   
  49. do i = 1 to times 
  50. EVENT.START.BARS = EVENT.START.BARS + nob
  51. EVENT.STOP.BARS = EVENT.STOP.BARS + nob
  52.  
  53.  
  54. ADDEVENT
  55.  
  56. end 
  57. end
  58. ENDSCAN
  59.  
  60.  
  61.  
  62.  
  63. BEGINSCAN 'all'                                      
  64.  
  65. if result ~= 0 then do forever             
  66.  
  67.   NEXTEVENT                                           
  68.   if result == 0 then break
  69. newend = times * nob + nob
  70.    if EVENT.TYPE == 'END' then do    
  71.       EVENT.START.BARS = newend + (EVENT.START.BARS - nob)
  72.    end
  73.   REPLEVENT                                          
  74.  end
  75. ENDSCAN                          
  76.  
  77.  
  78. MXPOINTER "normal"
  79.  
  80. EXIT
  81.  
  82. ST:
  83. BEGINSCAN 'selected'
  84.  
  85. if result ~= 0 then do forever        
  86.   
  87. nob = (BARDATA.STOP.BARS +1) - BARDATA.START.BARS
  88.  
  89. NEXTEVENT                
  90.   if result == 0 then break
  91.  
  92.  
  93.  if EVENT.TYPE == 'NOTE' then   
  94. do i = 1 to times 
  95. EVENT.START.BARS = EVENT.START.BARS + nob
  96. EVENT.STOP.BARS = EVENT.STOP.BARS + nob
  97.  
  98.  
  99. ADDEVENT
  100.  
  101. end 
  102. end
  103. ENDSCAN
  104.  
  105.  
  106.  
  107.  
  108. BEGINSCAN 'all'                                      
  109.  
  110. if result ~= 0 then do forever             
  111.  
  112.   NEXTEVENT                                           
  113.   if result == 0 then break
  114. newend = times * nob + nob
  115.    if EVENT.TYPE == 'END' then do    
  116.       EVENT.START.BARS = newend + (EVENT.START.BARS - nob)
  117.    end
  118.   REPLEVENT                                          
  119.  end
  120. ENDSCAN                          
  121.  
  122.  
  123. MXPOINTER "normal"
  124.  
  125. EXIT
  126.